#pragma once


#include "Pages/EditorPageViewModel.h"
#include "EditorWelcomePageModel.h"
#include "EditorWelcomePageViewModel.m.h"

class RTexture2D;

RCLASS()
class REditorWelcomePageViewModel : public REditorPageViewModel
{
    ROBJECT

public:
    virtual void BindModel(TSharedObjectPtr<REditorPageModel> InModel) override;
    virtual TSharedObjectPtr<RTexture2D> GetIcon() const override;
    virtual CString GetTitle() const override;
    //create a new project
    void NewProject();

    //open an existing project with a file dialog
    void OpenProject();

    int64_t GetRecentProjectNum() const;
    CString GetRecentProjectName(int64_t Index) const;
    CString GetRecentProjectPath(int64_t Index) const;

    void OpenRecentProject(int64_t Index);

protected:
    TWeakObjectPtr<REditorWelcomePageModel> Model;

    TSharedObjectPtr<RTexture2D> Icon;

};
